import mockjs from 'mockjs';

// const users = [
//   { id: 0, name: 'Umi123', nickName: 'U', gender: 'MALE' },
//   { id: 1, name: 'Fish', nickName: 'B', gender: 'FEMALE' },
// ];

export default {
    '/api/v1/queryUserList': mockjs.mock({
        success: true,
        errorCode: 0,
        data: {'list|100': [{'id|1-100': 50, name: '@city', 'nickName|1': 'U', 'gender|1': 'MALE'}]},
    }),
    '/api/v1/menus': mockjs.mock({
        success: true,
        errorCode: 0,
        data: [
            {
                name: '首页',
                path: '/home',
                component: '@/pages/Home',
            },
            {
                name: '系统管理',
                path: '/control',
                children: [
                    {
                        path: '/control/user',
                        name: '用户管理',
                        component: '@/pages/User',
                    },
                    {
                        path: '/control/role',
                        name: '角色管理',
                        component: '@/pages/Role',
                    },
                    {
                        path: '/control/menu',
                        name: '菜单管理',
                        component: '@/pages/Menu',
                    },
                    {
                        path: '/control/domain',
                        name: '用户域管理',
                        component: '@/pages/Domain',
                    },
                    {
                        path: '/control/domainenv',
                        name: '用户域配置',
                        component: '@/pages/DomainEnv',
                    },
                    {
                        path: '/control/dept',
                        name: '部门管理',
                        component: '@/pages/Dept',
                    },
                    {
                        path: '/control/post',
                        name: '岗位管理',
                        component: '@/pages/Post',
                    },
                    {
                        path: '/control/config',
                        name: '参数管理',
                        component: '@/pages/Config',
                    },
                    {
                        path: '/control/dict',
                        name: '字典管理',
                        component: '@/pages/Dict',
                    },
                ],
            },
            {
                name: '系统监控',
                path: '/monitor',
                children: [
                    {
                        path: '/monitor/session',
                        name: '在线用户',
                        component: '@/pages/Session',
                    }
                ]
            }
        ],
    }),
    /*'GET /api/v1/queryUserList': (req: any, res: any) => {
      res.json({
        success: true,
        data: { list: users },
        errorCode: 0,
      });
    },*/
    'POST /api/v1/user/': (req: any, res: any) => {
        res.json({
            success: true,
            errorCode: 0,
        });
    },
};
